﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="fileuploader.aspx.cs" Inherits="Com.Web.coffinegurunaru.manager.file.fileuploader" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>커핀그루나루 관리</title>
    <script language="javascript" src="/js/jquery-1.7.2.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
<table style="width:380px; height:100px;" border="0">
<tr>
	<td colspan="2" style="text-align:center;">관리자 파일 업로드</td>
</tr>
<tr>
	<td colspan="2" style="text-align:center; height:20px;">&nbsp;</td>
</tr>
<tr>
	<td>파일</td>
	<td><input type="file" id="FileField" name="FileField" /></td>
</tr>
<tr>
	<td colspan="2" style="text-align:center; height:40px;">&nbsp;</td>
</tr>
<tr>
	<td colspan="2" style="text-align:center;"><input type="button" value="전송" id="btUploader"/></td>
</tr>
</table>
<script language="javascript" type="text/javascript">
(function($) {
	$.FileUploader = {};
	
	$.FileUploader = {
		Init : function() {
			$("#btUploader").click(function() {
				$.FileUploader.Submit();
			});
		},
		
		Submit : function() {
			if ( $("#FileField").val() == "" )
			{
				alert( "파일을 선택하세요" );
				return ;
			}
			$("form").submit();
		}
	}
	
	$(function() {
		$.FileUploader.Init();
	});
	
})(jQuery);

</script>
    </form>
</body>
</html>
